package com.camelot.ccr.system.persistence;
// default package

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;


/**
 * Video entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="t_video")

public class Video  implements java.io.Serializable {


    // Fields    

     /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String id;
     private String videoName;
     private String videoUrl;
     private String pictureId;
     private String imgUrl;
     private Date createTime;
     @OneToOne
     @JoinColumn(name = "matchType")
     private MatchType matchType;
     private String type;


    // Constructors

    /** default constructor */
    public Video() {
    }

    
    /** full constructor */
    public Video(String videoName, String videoUrl, String pictureId, String imgUrl, Date createTime, MatchType matchType, String type) {
        this.videoName = videoName;
        this.videoUrl = videoUrl;
        this.pictureId = pictureId;
        this.imgUrl = imgUrl;
        this.createTime = createTime;
        this.matchType = matchType;
        this.type = type;
    }

   
    // Property accessors
    @GenericGenerator(name="generator", strategy="uuid.hex")@Id @GeneratedValue(generator="generator")
    
    @Column(name="id", unique=true, nullable=false, length=50)

    public String getId() {
        return this.id;
    }
    
    public void setId(String id) {
        this.id = id;
    }
    
    @Column(name="video_name", length=60)

    public String getVideoName() {
        return this.videoName;
    }
    
    public void setVideoName(String videoName) {
        this.videoName = videoName;
    }
    
    @Column(name="video_url", length=1000)

    public String getVideoUrl() {
        return this.videoUrl;
    }
    
    public void setVideoUrl(String videoUrl) {
        this.videoUrl = videoUrl;
    }
    
    @Column(name="picture_id", length=50)

    public String getPictureId() {
        return this.pictureId;
    }
    
    public void setPictureId(String pictureId) {
        this.pictureId = pictureId;
    }
    
    @Column(name="img_url", length=1000)

    public String getImgUrl() {
        return this.imgUrl;
    }
    
    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }
    @Temporal(TemporalType.DATE)
    @Column(name="create_time", length=10)

    public Date getCreateTime() {
        return this.createTime;
    }
    
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    
    @Column(name="type", length=50)

    public String getType() {
        return this.type;
    }
    
    public MatchType getMatchType() {
		return matchType;
	}

	public void setMatchType(MatchType matchType) {
		this.matchType = matchType;
	}


	public void setType(String type) {
        this.type = type;
    }
   
}